import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        method: 'get',
        params
    })
}
//查询连锁总店列表
export function chainList(params) {
    return request({
        url: `/shenye/merchant/chain/v1/list`,
        method: 'get',
        params
    })
}
//查询神椰商户
export function merchantSearch(id) {
    return request({
        url: `/shenye/merchant/chain/v1/${id}`,
        method: 'get',
    })
}
//新增神椰连锁总部
export function addMerchantChain(data) {
    return request({
        url: '/shenye/merchant/chain/v1',
        method: 'post',
        data,
    })
}
//删除神椰连锁总部
export function deleteMerchantChain(id) {
    return request({
        url: `/shenye/merchant/chain/v1/${id}`,
        method: 'DELETE',
    })
}
//神椰连锁门店列表
export function chainshopList(params) {
    return request({
        url: `/shenye/merchant/chain/v1/shop/list`,
        method: 'get',
        params
    })
}
//结算门店下拉框
export function settleShopSelect(params) {
    return request({
        url: `/shenye/merchant/chain/v1/settle/shop/select`,
        method: 'get',
        params
    })
}
//新增神椰连锁门店
export function chainshopListAdd(data) {
    return request({
        url: '/shenye/merchant/chain/v1/shop/add',
        method: 'post',
        data,
    })
}
//神椰连锁门店详情
export function chainshopDetail(id) {
    return request({
        url: `/shenye/merchant/chain/v1/detail/${id}`,
        method: 'get',
    })
}
//编辑神椰连锁门店
export function chainshopUpdate(data) {
    return request({
        url: '/shenye/merchant/chain/v1/shop/update/',
        method: 'post',
        data,
    })
}
//删除神椰连锁门店
export function deleteChainShop(id) {
    return request({
        url: `/shenye/merchant/chain/v1/shop/${id}`,
        method: 'DELETE',
    })
}
//神椰连锁人员列表
export function chainUserList(params) {
    return request({
        url: `/shenye/merchant/chain/v1/user/list`,
        method: 'get',
        params
    })
}
//新增神椰连锁人员
export function chainUserAdd(data) {
    return request({
        url: '/shenye/merchant/chain/v1/user/add/',
        method: 'post',
        data,
    })
}
//结算门店下拉框
export function userShopSelect(params) {
    return request({
        url: `/shenye/merchant/chain/v1/user/shop/select`,
        method: 'get',
        params
    })
}
//神椰连锁人员详情
export function chainUserDetail(id) {
    return request({
        url: `/shenye/merchant/chain/v1/user/detail/${id}`,
        method: 'get',
    })
}
//编辑神椰连锁人员
export function chainUserUpdate(data) {
    return request({
        url: '/shenye/merchant/chain/v1/user/update/',
        method: 'post',
        data,
    })
}
//停用-启用神椰连锁人员
export function chainUserStatus(data) {
    return request({
        url: '/shenye/merchant/chain/v1/user/status/',
        method: 'post',
        data,
    })
}
//删除神椰连锁门店
export function deleteChainUser(id) {
    return request({
        url: `/shenye/merchant/chain/v1/user/${id}`,
        method: 'DELETE',
    })
}
//神椰连锁商户门店申请列表
export function chainShopApplyLs(params) {
    return request({
        url: `/shenye/merchant/chain/v1/shop/apply/list`,
        method: 'get',
        params
    })
}
//新增神椰连锁商户门店申请
export function shopApplyAdd(data) {
    return request({
        url: '/shenye/merchant/chain/v1/shop/apply/add/',
        method: 'post',
        data,
    })
}
//神椰连锁商户门店申请详情
export function shopApplyDetail(id) {
    return request({
        url: `/shenye/merchant/chain/v1/shop/apply/detail/${id}`,
        method: 'get',
    })
}
//编辑神椰连锁商户门店申请
export function shopApplyUpdate(data) {
    return request({
        url: '/shenye/merchant/chain/v1/shop/apply/update/',
        method: 'post',
        data,
    })
}
// <------------神椰 2.4.6-2 Star----------------->
// 查询神椰连锁门店资质图片
export function chainImgDetail(id) {
    return request({
        url: `/shenye/merchant/chain/v1/img/detail/${id}`,
        method: 'get',
    })
}
//更新商家图片信息
export function merchantChainImgRenew(data) {
    return request({
        url: '/shenye/merchant/chain/v1/img/detail',
        method: 'put',
        data
    })
}
//  <----------------end--------------------->

